import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'
const UserInfo = 'userinfo'
const LuYou = 'luyou'
const ruter = 'Routers'


export function getToken() {
    return Cookies.get(TokenKey)
}

export function setToken(token) {
    return Cookies.set(TokenKey, token)
}

export function removeToken() {
    return Cookies.remove(TokenKey)
}


export function getUserInfo() {
    return Cookies.get(UserInfo)
}

export function setUserInfo(token) {
    return Cookies.set(UserInfo, token)
}

export function removeUserInfo() {
    return Cookies.remove(UserInfo)
}

export function getLuYou() {
    return localStorage.getItem(LuYou)
}

export function setLuYou(token) {
    return localStorage.setItem(LuYou, token)
}

export function removeLuYou() {
    return localStorage.removeItem(LuYou)
}

export function getrouter() {
    return Cookies.get(ruter)
}

export function setrouter(data) {
    return Cookies.set(ruter, data)
}

export function removerouter() {
    return Cookies.remove(ruter)
}

